<style>
table tr td
{
	padding:5px;
	font-size:12px;
}
</style>
<table class="ordersinfo" cellpadding="4" cellspacing="6" id="face_fil" style="border:1px solid #bbb;padding:5px;" >
<tr>
<td colspan="4" ><h2> Order Details</h2> 

</td>
</tr>
<?php
//print_r($orders);
if(!empty($orders)) 
{
	?>
    <tr>
    <th> &nbsp; </th>
    <th> Code </th>  
    <th> Name </th> 
    <th> Number of items </th> 
    <th> Unit Cost </th>  
    <th> Total</th> 
    </tr>
    <?php
	foreach($orders as $key => $record) 
	{ 
	?>

 <td > 
 	<img src="<?=$image_path?>products/<?=$record['id'] ?>.<?=$record['image'] ?>" height="50" width="50"/>
  </td>
  

    
    
    	
         <td>
        	<?php 
			
			echo $record['code'];
			
			
	 		 ?>  
        </td>
      
        <td>
			<?php 
           	echo $record['name'];
            ?>
        </td>

      
     
        <td>
			 
           <?php 
           	echo $record['quantity'];
            ?>
            
        </td>
   		
        
        <td>
			 
           <?php 
           	echo $record['unit_amount'];
            ?>
            
        </td>
        
        <td>
     		 <?php 
			 $tot   += $record['total']; 
           	echo $record['total'];
            ?>
      
        </td>
       
        
       
        <td></tr>
        <?php 
		
		
	}
	?>
    <tr><td colspan="6" align="right"> <b>  Total:  </b><?php echo number_format($tot,2); ?> </td> </tr>
    <?php
}
?>
        
        
        </td>
      
    </tr>
   
 
  
 
   

    
     
   

</table>